package academic.ui.client.widgets;

import org.vaadin.gwtgraphics.client.DrawingArea;
import org.vaadin.gwtgraphics.client.shape.Text;

import ui.client.GenericContainerTag;

import com.google.gwt.user.client.ui.Composite;

public class Logo extends Composite {

	GenericContainerTag fp = new GenericContainerTag("div");
	
	public Logo() {
		final GenericContainerTag div = new GenericContainerTag("div");
		div.setStyleName("logoContent");
		div.setPixelSize(310,60);
		fp.add(div);
		showLogo();
		
		final DrawingArea area = new DrawingArea(310,60);
		
		final Text soco = new Text(20,45,"soco deals");
		soco.setFillColor("#0981BE");
		soco.setStrokeColor("#E0FFFF");
		soco.setFontSize(60);
		
		area.add(soco);
	      
		/*        
		Window.addResizeHandler(new ResizeHandler() {

			@Override
			public void onResize(ResizeEvent event) {
				area.setWidth(Window.getClientWidth());
				div.setPixelSize(Window.getClientWidth(),80);
				new Animate(soco,"x",soco.getX(),Window.getClientWidth()/2-200,400).start();
			}
			
		});
		*/
        div.add(area);
 
       
		initWidget(fp);
	}
	
	public void showLogo() {
		fp.setVisible(true);
	}
}
